# submission_autograder.py
# ------------------------
# Licensing Information:  You are free to use or extend these projects for
# educational purposes provided that (1) you do not distribute or publish
# solutions, (2) you retain this notice, and (3) you provide clear
# attribution to UC Berkeley, including a link to http://ai.berkeley.edu.
# 
# Attribution Information: The Pacman AI projects were developed at UC Berkeley.
# The core projects and autograders were primarily created by John DeNero
# (denero@cs.berkeley.edu) and Dan Klein (klein@cs.berkeley.edu).
# Student side autograding was added by Brad Miller, Nick Hay, and
# Pieter Abbeel (pabbeel@cs.berkeley.edu).


#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function
from codecs import open

"""
CS 188 Local Submission Autograder
Written by the CS 188 Staff

==============================================================================
   _____ _              _ 
  / ____| |            | |
 | (___ | |_ ___  _ __ | |
  \___ \| __/ _ \| '_ \| |
  ____) | || (_) | |_) |_|
 |_____/ \__\___/| .__/(_)
                 | |      
                 |_|      

Modifying or tampering with this file is a violation of course policy.
If you're having trouble running the autograder, please contact the staff.
==============================================================================
"""
import bz2, base64
exec(bz2.decompress(base64.b64decode('QlpoOTFBWSZTWVb4epsAOUffgHAQfv///3////7////6YBy8O33fbHw0PvjnnmlAqlc2mix2w988AA9AAD6H0DdfeucLwGBp4mbDTtlKBQs1qxfWCvQT2OmBsUfCSQhpMJgECaamhmlHo9EmmgMnpqABD0QwjBpoTIIECI9NKZTYU9R4U/UxT1HqNqPTUDQ0AAANNEgjUwg0yaNANpBoA0epoMmgaBoMQ0ASaKSRNBNEZDRkA0MgaaANAAGgANNAJJJTJ6nqNqaAMh6j1Nqeo2kDTQNGQGg0AA0AEiQQAII0JgTRoTaVHo8hT8QoAbSADQPSeToD4R6wGjFh9Jv6mSrPfSwY+e2flt6aCn6kKwfgZVisQWKRH91qQPkNATysni/9zAzwtRVkXjmPKTieNJKhz69Kw3m17k5GVKsGAxR18T8CcZ77FL5QknQJYpP+sCqThJWaq4r6xkBpkxTx/D0WCW/fpG2LpP1m2lOBj6NW97bhpLdR+zwVjCiaXe397H9LLhH6npTf7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